#!/bin/sh
process_name=$1
pid=$(pidof $process_name)
##ps aux | grep $process_name
echo $process_name $pid >>status_monitor.txt
echo "Monitor process script running..."
while true
do
##ps aux | grep $process_name >>status_monitor.txt
ps aux | grep $process_name | tee -a status_monitor.txt
sleep 30
done
